London 9 -Sana Asaf - JavaScript-Core-2-Coursework-Week1#181
Conversation
|
|
||
| let array=basketballTeam.topPlayers; | ||
| console.log(array.sort()); | ||
| // write code here |
There was a problem hiding this comment.
Great job, we wanted to see the name of each player so you should do this instead:
basketballTeam.topPlayers.sort().map(eachPlayer =>. console.log(eachPlayer))
There was a problem hiding this comment.
Its concise and so neat ! I will try and refactor mine
| */ | ||
| if (student["examScore"]>60 && student["attendance"]>=90) | ||
| student["hasPassed"] = true ; | ||
|
|
There was a problem hiding this comment.
good job, you can also add else :
`else{
student["hasPassed"] = false;
}`
| } | ||
| recipe.displayRecipe(); | ||
| recipe1.displayRecipe(); | ||
| recipe2.displayRecipe(); |
There was a problem hiding this comment.
great job and a great idea, but the question did not want you to have a method inside of each recipe, it is important to do what the questions ask us to do, you should find a way to go through each recipe and console.log the recipe items.
hint: you can have array of objects
| shoppingList.items = []; | ||
| recipe.ingredients.map(item => { | ||
| if (!pantry.fridgeContents.includes(item) && !pantry.cupboardContents.includes(item)) | ||
| shoppingList.items.push(item); |
There was a problem hiding this comment.
great job, you can use concat function from Javascript to combine both arrays and have one array and check the items in that array ==> let allIHave = pantry.fridgeContents.concat(cupBoardContents)
Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in
HOW_TO_MARK.mdin the root of this repositoryYour Details
Homework Details
Notes
What did you find easy?
What did you find hard?
What do you still not understand?
Any other notes?